{extend name="Public:base"/}

{block name="main"}
<div class="box-info">
    <form method="post" action="{:U('Block/add')}">
        <div class="form-group row">
            <label class="form-control-label col-md-2">碎片名称:</label>
            <div class="col-md-8">
                <input type="text" class="form-control" name="name" id="name" value="{$vo.name}">
            </div>
        </div>
        <div class="form-group row">
            <label class="form-control-label col-md-2">碎片类型:</label>
            <div class="col-md-8">
                <div class="form-check form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input" type="radio" name="type" value="url" checked="">链接地址
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input" type="radio" name="type" value="img">图片
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input" type="radio" name="type" value="file">文件
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input" type="radio" name="type" value="text">纯文本
                    </label>
                </div>
                <div class="form-check form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input" type="radio" name="type" value="rtf">富文本
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group row">
            <label class="form-control-label col-md-2">内容:</label>
            <div class="col-md-8">
                <script type="text/javascript" charset="utf-8" src="/public/static/neditor/neditor.config.js"></script>
                <script type="text/javascript" charset="utf-8" src="/public/static/neditor/neditor.all.min.js"> </script>
                <script type="text/javascript" charset="utf-8" src="/public/static/neditor/lang/zh-cn/zh-cn.js"></script>
                {: $form->editor(array('field'=>'content','modelid'=>'-1','setup'=>array('toolbar'=>'full','flashupload'=>'1')))}
            </div>
        </div>
        <div class="form-group row">
            <label class="form-control-label col-md-2">所属组:</label>
            <div class="col-md-4">
                <select name="groupid" class="form-control">
                    <option value="1">pc端</option>
                    <option value="2">wap端</option>
                </select>
            </div>
        </div>
        <div class="form-actions">
            <button type="submit" class="btn btn-primary ajax_form_add">提交</button>
            <button type="button" class="btn btn-danger" onclick="javascript:history.back(-1);return false;">返回</button>
        </div>
    </form>

</div>
{/block}